/**
 *@ClassName CalcDemo
 *
 *@Author ykx
 *@Date  2024/6/17 21:21
 *@Version 1.0
 */
fun main(args: Array<String>) {
    while (true) {
        println("请输入第一个数字:")
        var num1str = readLine()
        println("请输入第二个数字:")
        var num2str = readLine()

        try {
            var num1: Int = num1str!!.toInt()
            var num2: Int = num2str!!.toInt()
            println("$num1 + $num2 = ${num1 + num2}")
        } catch (e: Exception) {
            println("您输入的数据有误")
        }

    }


}